/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.product.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * spu信息
 *
 * @author baogs
 * @date 2022-07-01 11:05:45
 */
@Data
@TableName("pms_spu_info")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "spu信息")
public class SpuInfo extends Model<SpuInfo> {

	private static final long serialVersionUID = 1L;

	/**
	 * 商品id
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "商品id")
	private Long id;

	/**
	 * 商品名称
	 */
	@ApiModelProperty(value = "商品名称")
	private String spuName;
	/**
	 * 商品名称(英文)
	 */
	@ApiModelProperty(value = "商品名称(英文)")
	private String spuNameEn;

	/**
	 * 商品描述
	 */
	@ApiModelProperty(value = "商品描述")
	private String spuDescription;

	/**
	 * 所属分类id
	 */
	@ApiModelProperty(value = "所属分类id")
	private Long catalogId;


	/**
	 * 品牌id
	 */
	@ApiModelProperty(value = "品牌id")
	private Long brandId;
	/**
	 * 品牌名
	 */
	@ApiModelProperty(value = "品牌名")
	private String brandName;
	/**
	 * 分类名
	 */
	@ApiModelProperty(value = "分类名")
	private String catalogName;

	/**
	 * 品牌图片
	 */
	@ApiModelProperty(value = "品牌图片")
	private String brandLogo;

	/**
	 * 上架状态[0 - 新建，1 - 上架，2 - 下架]
	 */
	@ApiModelProperty(value = "上架状态[0 - 新建，1 - 上架，2 - 下架]")
	private Integer publishStatus;

	/**
	 * createTime
	 */
	@ApiModelProperty(value = "createTime")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	/**
	 * updateTime
	 */
	@ApiModelProperty(value = "updateTime")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime updateTime;

	/**
	 * 作品故事
	 */
	@ApiModelProperty(value = "作品故事")
	private String story;

	/**
	 * 购买须知
	 */
	@ApiModelProperty(value = "购买须知")
	private String purchaseNotes;

	/**
	 * 发行数量
	 */
	@ApiModelProperty(value = "发行数量")
	private Integer publishQuantity;

	/**
	 * 发售数量
	 */
	@ApiModelProperty(value = "发售数量")
	private Integer sellQuantity;

	/**
	 * 发售模式：1：优先购+抢购2：优先购+抽签+抢购3：抢购
	 */
	@ApiModelProperty(value = "发售模式：1：优先购+抢购2：优先购+抽签+抢购3：抢购")
	private Integer sellPattern;

	/**
	 * 优先购开始时间
	 */
	@ApiModelProperty(value = "优先购开始时间")
	private LocalDateTime prioritySellBeginTime;

	/**
	 * 优先购结束时间
	 */
	@ApiModelProperty(value = "优先购结束时间")
	private LocalDateTime prioritySellEndTime;

	/**
	 * 抽签开始时间
	 */
	@ApiModelProperty(value = "抽签开始时间")
	private LocalDateTime drawBeginTime;

	/**
	 * 抽签结束时间
	 */
	@ApiModelProperty(value = "抽签结束时间")
	private LocalDateTime drawEndTime;

	/**
	 * 正式销售时间
	 */
	@ApiModelProperty(value = "正式销售时间")
	private LocalDateTime saleTime;

	/**
	 * 是否支持碎片支付
	 */
	@ApiModelProperty(value = "是否支持碎片支付")
	private Integer isSupportDebrisPay;

	/**
	 * 状态：1：待售2：预售3：抽签4：支付中5：抢购6: 售罄
	 */
	@ApiModelProperty(value = "状态：1：待售2：预售3：抽签4：支付中5：抢购6: 售罄")
	private Integer status;

	/**
	 * 是否上链(0默认未上链，1已上链)
	 */
	@ApiModelProperty(value = "是否上链")
	private Integer isChain;

	/**
	 * DDC或BFT的token
	 */
	@ApiModelProperty(value = "DDC或BFT的token")
	private Long token;

	/**
	 * 交易id
	 */
	@ApiModelProperty(value = "交易id")
	private Long txId;

	/**
	 * 交易Hash
	 */
	@ApiModelProperty(value = "交易Hash")
	private String txHash;

	/**
	 * 背景音乐
	 */
	@ApiModelProperty(value = "背景音乐")
	private String music;

	/**
	 * 视频
	 */
	@ApiModelProperty(value = "视频")
	private String video;
	/**
	 * 上链图片
	 */
	@ApiModelProperty(value = "上链图片")
	private String chainUrl;


	/**
	 * 发售价格
	 */
	@ApiModelProperty(value = "发售价格")
	private BigDecimal publishPrice;


	/**
	 * 每人限购数量
	 */
	@ApiModelProperty(value = "每人限购数量")
	private Integer preLimit;


	/**
	 * 藏品列表
	 */
	@TableField(exist = false)
	private List<SkuInfo> skuInfoList;

	/**
	 * 藏品列表
	 */
	@TableField(exist = false)
	private String avgPrice;

	/**
	 * 上链时间
	 */
	@ApiModelProperty(value = "上链时间")
	private LocalDateTime chainTime;
}
